<template>
	<view class="slideshow">
		<swiper autoplay circular>
			<swiper-item v-for="(d, index) in item.task_list" :key="index">
				<image :src="d.photo" @click="goTastDetail(d.t_id)">
				</image>
			</swiper-item>
		</swiper>

		<button class="sign_in" @click="jumpPage('/pagesMy/signIn/index')">
			<image :src="`${imgPath}/upload/h5/home/2.png`"></image>签到
		</button>

	</view>
</template>

<script>
	export default {
		props: {
			item: {
				type: Object,
				default: () => ({})
			}
		},

		data() {
			return {
				imgPath: uni.imgPath
			}
		},
		onShow() {
			console.log(1)

		},
		methods: {
			goTastDetail(tastId) {

				uni.navigateTo({
					url: `/pagesTask/tastDetail/index?tastId=${tastId}`
				})
			},
			jumpPage(url) {
				uni.navigateTo({
					url
				});
			},
		}
	}
</script>

<style lang="scss">
	.slideshow {
		position: relative;

		swiper {
			height: 660rpx;
		}

		image {
			width: 100%;
			height: 660rpx;
		}

		.instant_win {
			position: absolute;
			top: 26%;
			left: 8%;
			line-height: 60rpx;
			border-radius: 60rpx;
			color: #000;
			font-size: 30rpx;
			background-color: #fff;
		}

		.sign_in {
			position: absolute;
			top: 2%;
			right: 2%;
			line-height: 50rpx;
			border-radius: 50rpx;
			color: #2B91FC;
			border: 1px solid #2B91FC;
			font-size: 24rpx;

			image {
				width: 30rpx;
				height: 30rpx;
				vertical-align: middle;
				margin-right: 10rpx;
				position: relative;
				top: -3rpx;
			}
		}
	}
</style>